import { RequestData, POST, GET } from '@/utils/request-data';

const requestData = Object.create(RequestData);
requestData.setBaseUrl('/erp/dealer');

// 财务流水
export const consumptionPage = (params) =>
  requestData.base('/financial/flow/consumption/page', POST, params);
export const rechargePage = (params) =>
  requestData.base('/user/recharge/page', POST, params);

// 财务争议列表
export const disputePage = (params) =>
  requestData.base('/finance/order/dispute/page', POST, params);
export const disputeInject = (id) =>
  requestData.base(`/finance/order/dispute/cancel/${id}`, POST);

// 交易明细
export const transactionPage = (params) =>
  requestData.base('/user/trade/detail/page', POST, params);
// 我的账户
export const myAccountPage = (params) =>
  requestData.base('/finance/my/account/page', POST, params);
export const myVipsPage = (params) =>
  requestData.base('/finance/my/account/vips', POST, params);
export const myAccountMessage = (params) =>
  requestData.base('/finance/my/account/message', POST, params);
export const myAccountSummary = (params) =>
  requestData.base('/finance/my/account/summary', POST, params);
export const offlineRecharge = (params) =>
  requestData.base('/finance/my/account/offline/recharge', POST, params);
export const paymentPaypal = (params) =>
  requestData.base('/payment/paypal/pay', POST, params);
export const downloadBill = (params) =>
  requestData.base('/finance/my/account/download/bill', GET, params, '', true);
export const billPayment = (id) =>
  requestData.base(`/finance/my/account/bill/payment/${id}`, POST);
